import deviceInfo from '@ohos.deviceInfo';
import device from '@system.device';
export default {
    data: {
        title: 'World'
    },
    deviceInfo(){
        var deviceTypeInfo = deviceInfo.deviceType;
        console.log(JSON.stringify(deviceTypeInfo))
    },
    device(){
        device.getInfo({
            success: function(data) {
                console.log('Device information obtained successfully. Device brand:' + data.brand);
            },
            fail: function(data, code) {
                console.log('Failed to obtain device information. Error code:'+ code + '; Error information: ' + data);
            },
        });
    }
}
